#include <iostream>
#include <string>
#include <vector>
using namespace std;
 
int main()
{
    vector<int> arr(26, 0);
    string str;
    char res = 'a';
    int maxVal = arr[0];
    while(getline(cin, str))
    {
        for(auto& e : str)
        {
            if(++arr[e - 'a'] > maxVal)
            {
                maxVal = arr[e - 'a'];
                res = e;
            }
        }
    }
    cout << res << endl;
    return 0;
}